<!DOCTYPE html>
<html lang="en" ng-app="tplModule">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/angular-1.3.0.js"></script>
    <script src="js/test.js"></script>
    <!-- 声明一个模板 -->
    <script type="text/ng-template" id="base">
        <div>姓名：{{name}}</div>
        <div>性别：{{sex}}</div>
    </script>
</head>
<body>
<div><input type="text" value="123" id="txtTest"></div>
<!-- 调用模板 -->
<div ng-controller="myCtrl" ng-include src="'base'">
</div>
===========================
<div ng-controller="testCtrl">
    {{data}}
</div>
<script type="text/javascript">
    var myModule = angular.module("tplModule", []);
    myModule.controller("myCtrl", ["$scope", function ($scope) {
        $scope.name = "江俊";
        $scope.sex = "男";
    }]);

    myModule.controller("testCtrl",["$scope", function ($scope) {
        $scope.data = document.getElementById("txtTest").value;
    }]);
</script>
</body>
</html>